﻿@model EasyErp.ViewModel.TimeTableViewModel
           
@{
    ViewBag.Title = "Index";
}

@using (Html.BeginForm())
{

    <h2>Style No: @Model.StyleSizeList[0].Style.StyleNo</h2>
    @Html.HiddenFor(model => model.StyleId)
    
    <table>
        <tr>
            <th>
                Spec No
            </th>
            <th>
                Spec Description
            </th>
            <th>
                Operation No
            </th>
            <th>
                Operation Desc
            </th>
            @foreach (var item in Model.StyleSizeList)
            { 
                <th>
                    @Html.DisplayFor(model => item.SizeLabel)
                </th>
            }
        </tr>


        @{
            int j = 0;
            foreach (var item in Model.StyleOperationList)
            {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.OperationInfo.SpecNo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.OperationInfo.SpecDescription)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.OperationInfo.OperationNo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.OperationInfo.OperationDescription)
                </td>
                @for (int i=0; i < Model.StyleSizeList.Count; i++) {
                <td>
                    @Html.TextBoxFor(model => model.Time[j])
                </td>
                    @(j=j+1);
                }
            </tr>
            }
        }

            <tr>
                <td></td><td></td><td></td><td></td>
                <td><input type="submit" value="Save" /></td>
            </tr>
    </table>
}
